package com.f21.f21assessoria.dao;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import com.f21.f21assessoria.model.cadastro.Usuario;
import com.f21.f21assessoria.model.ergonometria.Treinamento;
import com.f21.f21assessoria.model.ergonometria.cadastro.TabelaPorcentagem;

@Repository("ergonomia")
@Transactional(propagation=Propagation.REQUIRED)
public class ErgonomiaDaoImp extends CrudDaoImp<Treinamento>  implements Serializable, ErgonomiaDao {
	private static final long serialVersionUID = 1L;

	@Override
	public List<Treinamento> listarTodos() {
		@SuppressWarnings("unchecked")
		ArrayList<Treinamento> arrayList = (ArrayList<Treinamento>) sessionFactory.getCurrentSession().createQuery("from Treinamento").list();
		return  arrayList;
	}

	@Override
	public Treinamento buscarPorId(long id) {
		// TODO Auto-generated method stub
		return null;
	}
	
	public List<TabelaPorcentagem> listarTabelaPorcentagem(){
		return null;
	}

}
